import 'package:example_app/route.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:example_app/api/wan_api.dart';
import 'package:example_app/bindings/repository_binding.dart';
import 'package:example_app/module/home/page.dart';
import 'package:dio/dio.dart';

void main() {
  GetInstance().lazyPut(() => Dio());
  GetInstance().lazyPut(() => WanApi(Get.find()));
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return GetMaterialApp(
      title: 'Flutter Demo',
      initialBinding: RepositoryBinding(),
      getPages: RouteConfig.getPages,
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const AppHomePage(),
    );
  }
}
